    <!--引入头部文件-->
    {{include file="VIEW_PATH/Common/header.php"}}
	<link rel="stylesheet" type="text/css" href="Public/Home/Css/pay.css"/>
	<script src="Public/Home/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="Public/Home/Js/pay.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
	$(function(){
		$('.edit').click(function(){
   	      var aid = $(this).attr('aid');
   	      $('.address_hidden_1').show();
	      $('.address_edit').show();
	      $.ajax({
	      	type:"post",
	      	url:"{{U('Address/getAjax')}}",
	      	data:{aid:aid},
	      	dataType:"json",
			success:function(phpData){
				$(".address_edit input[name='name']").val(phpData.name);
				$("#ad").text(phpData.ad);
				$(".address_edit input[name='phone']").val(phpData.phone);
				$(".address_edit input[name='code']").val(phpData.code);
				$(".address_edit input[name='aid']").val(phpData.aid);
			}
	      });
       })
       //如果点击地址给地址加边框
       $('form .name .address .real').click(function(){
       	$(this).addClass('color').siblings('.real').removeClass('color');
       })
       $('form .name .address .real').first().addClass('color');
       //点击去结算
       $('.cao .sub2').click(function(){
       	//抓地址aid
       	aid =$('.color').find(".hid").val();
       	$('#aid').val(aid);
       })
	})		
	</script>
	<!-- 购物进程开始 -->
	<div id="flower_header">
				<div class="logo">
				   <a href=""><img src="Public/Home/images/65bc4ebfe22d0c2eca1702c9736c_117_43.ch.png"/></a>
			   </div>	
			   <div class="steps">
			   	<img src="Public/Home/images/cart 1.jpg"/>
			   </div>
		</div>
	<!-- 购物进程结束 -->
	{{if value="isset($_SESSION['order'])"}}
	<!--购物车详情开始-->
	<form action="{{U('Payment/index')}}" method="post">
		<div class="name">
			<span class="all">选择收货地址</span>			
			<div class="address">
				<!--默认收货地址开始-->
				{{foreach from="$adData" key="$k" value="$v"}}
				<div class="real">
					<a href="javascript:;" style="font-weight: 700;font-size: 14px;color: #333;">{{$v['name']}}</a><br />
					<a href="javascript:;" style="line-height: 20px;">{{$v['ad']}}</a><br />
					<a href="javascript:;" style="line-height: 20px;">{{$v['phone']}}</a><br />
					<a href="javascript:;" aid="{{$v['aid']}}" class="edit" style="color: #f69;">修改</a>
					<input type="hidden" class="hid"  value="{{$v['aid']}}" />
				</div>
				{{endforeach}}
				<!--默认收货地址结束-->
				<!--新增收货地址开始-->
				<div class="real new">
					<a href="javascript:;" class="jh"></a><br />
					<a href="javascript:;"  style="line-height: 20px;">添加新地址</a>
				</div>
				<!--新增收货地址结束-->
			</div>			
		</div>
		
		
		<!--商品信息开始-->
		{{foreach from="$orderData" key="$k" value="$v"}}
		<div class="thing">
			
			<span style="margin-left: 494px;">单价</span>
			<span style="margin-left: 140px;">数量</span>
			<span style="margin-left: 150px;">小计</span>
			<!--订单信息开始-->
			<div class="xq">
				
				<img src="{{$v['image']}}" style="position: absolute;top: 15px;left: 40px;width: 90px;height: 90px;"/>
				<a href="" style="position: absolute;top: 15px;left: 160px;">{{$v['name']}}</a>
				<div class="size">
					{{foreach from="$v['tname']" key="$kk" value="$vv"}}
					<span>{{$vv}}：{{$v['options'][$kk]}}</span><br />
					{{endforeach}}
				</div>
				<span style="position: absolute;top: 15px;left: 490px;">{{$v['price']}}</span>
				<a href="" style="position: absolute;top: 15px;right: 295px;">{{$v['num']}}</a>
				<span style="position: absolute;top: 15px;right: 110px;">{{$v['total']}}</span>
			</div>
			<!--订单信息结束-->
			<!--商家留言开始-->
			<div class="message">
				<span style="margin-left: 20px;">给商家留言：</span>
				<input type="text" name="com[{{$k}}]" placeholder="选填，建议填写与商家达成一致的说明" />
				<span style="margin-left: 400px;">运费：</span>
				<span style="margin-left: 20px;">¥ 0.00</span>
			</div>
			<!--商家留言结束-->
		</div>
		<!--商品信息结束-->
		{{endforeach}}
		<!--操作开始-->
		<div class="cao">
			<a href="" style="margin-left: 20px;color: #f69;"><返回购物车</a>
			<span class="price" style="margin-left: 615px;padding-right: 10px;">应付款：<span style="color: #f69;font-size: 20px;">¥ {{$tot}}</span></span>
			<input type="submit" value="去结算" class="sub2"/>
			<input type="hidden" name="aid" id="aid" value="" />
		</div>
		<!--操作结束-->
		
	</form>
	<!--购物车详情结束-->
{{endif}}



<!--公共底部开始-->
{{include file="VIEW_PATH/Common/footer.php"}}

<!-- 右边悬浮div开始 -->
<div id="float">
	<ul>
		<li><a href="">购物车</a></li>
		<li style="border:none;"><a href="">客服信息</a></li>
	</ul>
</div>
<!-- 右边悬浮div结束 -->

<!--返回顶部按钮开始-->
<div class="top">
	<a href="#"><img src="Public/Home/images/top.png"style="margin: 15px 10px;" /></a>
</div>
<!--返回顶部按钮结束-->







<!--新增地址弹窗开始-->
<!--添加地址浮层-->
		<div class="address_hidden_1" style="display: none;">
			
		</div>
		
		<div class="address_hidden" style="display: none;">
			
			<div class="address_box">
				
				<div class="add_box_title">
					<span>新增收货地址</span>
					<a href="javascript:;" class="close"></a>
				</div>
				<div class="address_content">
					<form action="{{U('Address/store')}}" method="post">
					<div class="address_s_info">
						<span><i>*</i><strong>收货人姓名</strong></span><p><input type="text" name="name" /></p>
					</div>
					<div class="address_s_info">
						<span><i>*</i><strong>联系电话</strong></span><p><input type="text" name="phone" /></p>
					</div>
					<div class="address_s_xiangqing">
						<span><i>*</i><strong>所在区域</strong></span><p><textarea name="ad" ></textarea></p>
					</div>
					<div class="address_s_info">
						<span><strong>邮政编码</strong></span><p><input type="text" name="code" /></p>
					</div>
					<input type="hidden" name="uid" id="uid" value="{{$_SESSION['id']}}" />
					
					<!--按钮-->
					<div class="buttom_box">
						<input type="submit" name="" id="" class="save_btn" value="保存" />
						<input type="button" name="" id="" class="exit_btn" value="取消" />
					</div>
					</form>
				</div>
				
			</div>
		</div>
		
		<div class="address_edit" style="display: none;">
			
			<div class="address_box">
				
				<div class="add_box_title">
					<span>修改收货地址</span>
					<a href="javascript:;" class="close"></a>
				</div>
				<div class="address_content">
					<form action="{{U('Address/edit')}}" method="post">
					<div class="address_s_info">
						<span><i>*</i><strong>收货人姓名</strong></span><p><input type="text" id="name"  name="name" /></p>
					</div>
					<div class="address_s_info">
						<span><i>*</i><strong>联系电话</strong></span><p><input type="text" name="phone" /></p>
					</div>
					<div class="address_s_xiangqing">
						<span><i>*</i><strong>所在区域</strong></span><p><textarea id="ad" name="ad" ></textarea></p>
					</div>
					<div class="address_s_info">
						<span><strong>邮政编码</strong></span><p><input type="text" name="code" /></p>
					</div>
					<input type="hidden" name="aid"  value="" />
					
					<!--按钮-->
					<div class="buttom_box">
						<input type="submit" name="" id="" class="save_btn" value="保存" />
						<input type="button" name="" id="" class="exit_btn" value="取消" />
					</div>
					</form>
				</div>
				
			</div>
		</div>
<!--新增地址弹窗结束-->
</body>
</html>